// In App.js in a new project

import * as React from 'react';
import { View, Text,Image } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
function HomeScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Text>Home Screen</Text>
    </View>
  );
}

function MineScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
       <Text>Home 22222222222</Text>
       <Text>Home 22222222222</Text>
       <Image source={require('./src/assets/iconfont/icon_home.png') }></Image>
    </View>
  );
}


const Tab = createBottomTabNavigator();

function App() {
  return (
    <NavigationContainer>
      <Tab.Navigator>
        <Tab.Screen name="Home" component={HomeScreen} options={{tabBarLabel:'首页',
       tabBarIcon: ({ color, size }) => (
        <MaterialCommunityIcons name="home" color={color} size={size} />
      ),}}/>
        <Tab.Screen name="Mine" component={MineScreen} options={{
          tabBarLabel:'我的',
          tabBarIcon: ({ color, size }) => (
            <Image source={require('./src/assets/iconfont/icon_home.png')}  style={{ width: 30, height: 30 }}/>
          )  
        }}/>
    </Tab.Navigator>
    </NavigationContainer>

  );
}

export default App;